package cn.pfz.domain;

import com.alibaba.druid.support.json.JSONUtils;
import lombok.*;

import java.util.HashMap;

@Setter
@Getter
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class Department {
    private Long id;

    private String name;

    private String sn;

    //返回json字符串
    public String getjson(){
        HashMap<String, Object> map = new HashMap<>();
        map.put("id",this.id);
        map.put("name",this.name);
        map.put("sn",this.sn);
        String s = JSONUtils.toJSONString(map);
        return s;
    }

}